package com.cloudfun.campusshare.common.model.dto;

import com.cloudfun.campusshare.common.constant.LoginSource;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * Created by Huqin on 2020/4/16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "验证码登录")
public class VerifyCodeH5LoginDTO {

    @ApiModelProperty(value = "手机号")
    @NotEmpty(message = "手机号不能为空")
    private String phone;

    @ApiModelProperty(value = "验证码")
    @NotEmpty(message = "验证码不能为空")
    @Length(max = 6, message = "验证码限制20个字")
    private String inputCode;

    @ApiModelProperty(value = "微信用户信息code")
    private String code;

    @ApiModelProperty(value = "登录源")
    @NotNull(message = "登录源不能为空")
    private LoginSource source;
}
